package at.jku.pervasive.gui.renderer;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;

public class LastSeenTableCellRender extends DefaultTableCellRenderer
{

	private DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss.SSS");

	public LastSeenTableCellRender()
	{
		super();

		setHorizontalAlignment(SwingConstants.RIGHT);
	}

	@Override
	protected void setValue(Object value)
	{
		setText((value == null) ? "" : dateFormat.format(value));
	}

}
